﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="seal_order_detail.aspx.cs" Inherits="seal_seal_order_detail" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>シール注文書詳細</title>
    <meta   http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" href="../css/global.css" />
    <script src="../js/jquery-1.6.min.js" type="text/javascript"></script>
 <script language="JavaScript">
    
     $(document).ready(function() {
            $("#TRN_SEAL_QTY1").change( function() { 
                calcSum();
            } ); 
            
            $("#TRN_SEAL_QTY2").change( function() { 
                calcSum();
            } );
             
            $("#TRN_SEAL_QTY3").change( function() { 
                calcSum();
            } );
             
            $("#TRN_SEAL_QTY4").change( function() { 
                calcSum();
            } );
             
            $("#TRN_SEAL_QTY5").change( function() { 
                calcSum();
            } ); 
        }); 
        

    function calcSum() {
	    var sum = 0;
    	
	    for( var i = 1 ; i <= 5 ; i++ ) {
		    if( !isNaN( parseInt( $("#TRN_SEAL_QTY"+i).val() ) ) )
			    sum += parseInt($("#TRN_SEAL_QTY"+i).val());
    		
    		
	    }
    	
	    $("#sum").val(sum) ;
    }
    
    function receipt() {
	    return confirm("受付処理を行います") ;
		 
    }

</script>
</head>
<body leftmargin="20" topmargin="5" marginwidth="20" marginheight="5">

<FORM id="formID" runat="server">
<%
    Kaidou.Model.LoginModel login = (Kaidou.Model.LoginModel)Session["loginModel"];
    Kaidou.Model.Order order = (Kaidou.Model.Order)Session["order"];
    Kaidou.Model.TrnJuchuh tjh = order.getJuchu_H();
    Kaidou.Model.TrnJuchud[] trn_model_d = order.getJuchu_D();

    
%>
	<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
		<tr> 
			<td> 
				<table width="600" border="0" cellspacing="0" cellpadding="0">
					<tr> 
						<td width="10">　</td>
						<td width="400"><h2><asp:Label ID="htitle" runat="server"></asp:Label></h2>
							回胴式遊技機商業協同組合　事務局　</td>
						<td width="180" valign="bottom"> 
						<div align="right">更新回数 <asp:Label ID="count" runat="server"></asp:Label> 回</div>
					</td>
					<td width="10" valign="bottom">　</td>
					</tr>
					<tr> 
						<td colspan="4"> 
							<hr width="100%" size="1">
						</td>
					</tr>
				</table>
				
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
				    <tr> 
					    <td width="30" height="30">　</td>
					    <td height="30"><font color="RED">
					    <asp:Label ID="msg" runat="server"></asp:Label>
					    </font></td>
				    </tr>
			    </table>
			    
			    <%
                    if (Kaidou.Model.TrnJuchuh.JUCHU_CLSS_FAX.Equals(tjh.JuchuClss) && Kaidou.Model.TrnJuchuh.FAX_ERROR_FLAG_ERROR.Equals(tjh.FaxErrorFlg))
                    {
						//FAX/OCRでエラー有り。
				%>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="30" height="30">　</td>
						<!--td width="20%" valign="middle"><font color="#FF0000">FAX/OCR ERRMSG</font></td-->
						<td><font color="#FF0000">
						<br>
						<%=tjh.FaxocrText1 == null ? "" : ("＃" + tjh.FaxocrText1 + "<br>")%>
						<%=tjh.FaxocrText2 == null ? "" : ("＃" + tjh.FaxocrText2 + "<br>")%>
						<%=tjh.FaxocrText3 == null ? "" : ("＃" + tjh.FaxocrText3 + "<br>")%>
						<%=tjh.FaxocrText4 == null ? "" : ("＃" + tjh.FaxocrText4 + "<br>")%>
						<%=tjh.FaxocrText5 == null ? "" : ("＃" + tjh.FaxocrText5 + "<br>")%>
						<%=tjh.FaxocrText6 == null ? "" : ("＃" + tjh.FaxocrText6 + "<br>")%>
						<%=tjh.FaxocrText7 == null ? "" : ("＃" + tjh.FaxocrText7 + "<br>")%>
						<%=tjh.FaxocrText8 == null ? "" : ("＃" + tjh.FaxocrText8 + "<br>")%>
						<%=tjh.FaxocrText9 == null ? "" : ("＃" + tjh.FaxocrText9 + "<br>")%>
						<%=tjh.FaxocrText10 == null ? "" : ("＃" + tjh.FaxocrText10 + "<br>")%>
						<%=tjh.FaxocrText11 == null ? "" : ("＃" + tjh.FaxocrText11 + "<br>")%>
						<%=tjh.FaxocrText12 == null ? "" : ("＃" + tjh.FaxocrText12 + "<br>")%>
						<%=tjh.FaxocrText13 == null ? "" : ("＃" + tjh.FaxocrText13 + "<br>")%>
						</font></td>
					</tr>
					<tr>
						<td width="30" height="30">　</td>
						<!--td>
							<font color="#FF0000">イメージパス</font>
						</td-->
						<td>
							<a href="<%=tjh.OcrPassTxt %>"><%=tjh.OcrPassTxt %></a>
						</td>
					</tr>
				</table>
				<%
					}
				%>
			
				<table width="600" border="0" cellspacing="2" cellpadding="2">
					<tr> 
						<td width="310">　</td>
						<td width="100"> 注文日：</td>
						<td width="190">
						    <table border="0" cellspacing="0" cellpadding="0" align="left">
							<tr> 
								<td>20</td>
								<td> 
									<asp:TextBox ID="JUCHU_YY" MaxLength="2" Columns="2"  runat="server" ></asp:TextBox>
								</td>
							</tr>
						    </table>年<asp:TextBox ID="JUCHU_MM" MaxLength="2" Columns="2"  runat="server"></asp:TextBox>月<asp:TextBox ID="JUCHU_DD" MaxLength="2" Columns="1"  runat="server"></asp:TextBox>日
						</td>
					</tr>
					
					<% 
                        //tjh.FaxRcvDate != null && !tjh.FaxRcvDate.ToString().Equals("")	
			Kaidou.Model.LoginModel loginModel = (Kaidou.Model.LoginModel)Session["loginModel"];
            if (!loginModel.isJimukyoku() && !loginModel.isOperator())
            { 
				    %>
				    <tr> 
					    <td width="310">　</td>
					    <td width="100">受信日時： </td>
					    <td width="190"><%=((DateTime)tjh.FaxRcvDate).ToString("yyyy年MM月dd日 hh:mm") %> </td>
				    </tr>
				    <% 
					    }
				    %>
    				<tr> 
						<td width="310">　</td>
						<td width="100"> 組合員コード：</td>
						<td width="190">
						<asp:TextBox ID="MST_UNION_CODE" MaxLength="5" Columns="7" runat="server"></asp:TextBox>
						</td>
					</tr>
					<tr> 
						<td width="310">　</td>
						<td width="100"> 組合員名：</td>
						<td width="190">
						<asp:Label ID="ParentOfficeName" runat=server></asp:Label>
						</td>
					</tr>
					<tr> 
						<td width="310">　</td>
						<td width="100"> 支店名：</td>
						<td width="190">
						<asp:TextBox ID="MST_BRANCH_CODE" MaxLength="3" Columns="5" runat="server"></asp:TextBox><asp:Label ID="Branch_office_name" runat="server"></asp:Label>
						</td>
					</tr>
					<tr> 
						<td width="310">　</td>
						<td width="100"> 注文担当者：</td>
						<td width="190"><asp:TextBox ID="TRN_JUCHU_TANTO_NAME" MaxLength="10" Columns="20" runat="server"></asp:TextBox>様 </td>
					</tr>
				</table>
				<br>
				<table width="600" border="0" cellspacing="0" cellpadding="0">
					<tr height="50"> 
						<td width="33%" align="center"><font size="+2"><b><h1>確認シール注文書修正</h1> 
							</b></font> </td>
				</table>
				<br>
				<table width="600" border="0" cellspacing="0" cellpadding="0">
					<tr> 
						<td colspan="2"> 
							<p><b><font color="#666666">1.確認シール送付先</font></b></p>
						</td>
					</tr>
				</table>
				<br>
				<table width="50%" border="0" cellspacing="0" cellpadding="0" bgcolor="#999999">
					<tr> 
						<td width="0" height="0"> 
							
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
                <tr> 
                	<td width="15%" bgcolor="#f0f0f0" nowrap><asp:Label ID="addressmsg" runat="server"></asp:Label></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<br>
				<br>
				<table width="600" border="0" cellspacing="0" cellpadding="0">
					<tr> 
						<td colspan="2"> 
							<p><b><font color="#666666">2.注文内容</font></b></p>
						</td>
					</tr>
				</table>
				<br>
				<table width="600" border="0" cellspacing="2" cellpadding="2">
					<tr> 
						<td width="115">配達希望日</td>
						<td width="485">20
						    <asp:TextBox ID="TRN_HOPE_YEAR" MaxLength="2" Columns="2" CssClass="input" runat="server"></asp:TextBox>
							年 
							<asp:TextBox ID="TRN_HOPE_MONTH" MaxLength="2" Columns="2" CssClass="input" runat="server"></asp:TextBox>
							月 
							<asp:TextBox ID="TRN_HOPE_DAY" MaxLength="2" Columns="2" CssClass="input" runat="server"></asp:TextBox>
							日</td>
					</tr>
					<tr> 
						<td width="115">配達希望時間帯</td>
						<td width="485">
						    <asp:RadioButton ID="TRN_HOPE_TIME_CLSS1"  GroupName="TRN_HOPE_TIME_CLSS" runat="server" Text="指定なし" Checked  runat="server"/>
							<asp:RadioButton ID="TRN_HOPE_TIME_CLSS2" GroupName="TRN_HOPE_TIME_CLSS" runat="server" Text="午前" runat="server" />
							<asp:RadioButton ID="TRN_HOPE_TIME_CLSS3" GroupName="TRN_HOPE_TIME_CLSS" runat="server" Text="午後" runat="server" />
						</td>
					</tr>
				</table>
				<br>
				・販売業者登録証番号の印字希望なしの場合<br>
				<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#999999">
					<tr> 
						<td width="0" height="0"> 
							
                          <table width="100%" border="0" cellspacing="1" cellpadding="2">
                            <tr> 
									<td bgcolor="#f0f0f0" width="55%"> 
										<div align="center">登録証番号</div>
									</td>
									<td bgcolor="#f0f0f0" width="15%"> 
										<div align="center">枚数</div>
									</td>
									<td bgcolor="#f0f0f0" width="30%"> 
										<div align="center">確認シール番号</div>
									</td>
								</tr>
	    
								<tr bgcolor="#FFFFFF"> 
									<td> 
										<div align="center">印字なし</div>
									</td>
									<td> 
										<div align="right"><asp:TextBox ID="TRN_SEAL_QTY1" Columns="5" MaxLength="5"   runat="server"></asp:TextBox>枚</div>
									</td>
									<td> 
										<div align="center">～</div>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<br>
				・販売業者登録証番号の印字希望ありの場合<br>
				<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#999999">
				<tr> 
					<td width="0" height="0"> 
				        <table width="100%" border="0" cellspacing="1" cellpadding="2">
                        <tbody><tr> 
									<td bgcolor="#f0f0f0" width="30%"> 
										<div align="center">登録証番号</div>
									</td>
									<td bgcolor="#f0f0f0" width="25%"> 
										<div align="center">会社名</div>
									</td>
									<td bgcolor="#f0f0f0" width="15%"> 
										<div align="center">枚数</div>
									</td>
									<td bgcolor="#f0f0f0" width="30%"> 
										<div align="center">確認シール番号</div>
									</td>
								</tr>
					
					
								<tr bgcolor="#FFFFFF"> 
									<td> 
										<div align="center">
										<asp:TextBox ID="TRADER_REG_NO12" MaxLength="2"  Columns="2"  runat="server"></asp:TextBox>
										- 
										<asp:TextBox ID="TRADER_REG_NO22" MaxLength="5"  Columns="5"  runat="server"></asp:TextBox>
										</div>
									</td>
									<td>
										<div align="left"><asp:Label ID="TRADER_REG_NO_LABEL2" runat="server"></asp:Label></div>
									</td>
									<td> 
										<div align="right"><asp:TextBox ID="TRN_SEAL_QTY2" Columns="5" MaxLength="5"   runat="server"></asp:TextBox>枚</div>
									</td>
									<td> 
										<div align="center">～</div>
									</td>
								</tr>
					
								<tr bgcolor="#FFFFFF"> 
									<td> 
										<div align="center">
										<asp:TextBox ID="TRADER_REG_NO13" MaxLength="2" Columns="2" runat="server"></asp:TextBox>
										- 
										<asp:TextBox ID="TRADER_REG_NO23" MaxLength="5" Columns="5" runat="server"></asp:TextBox>
										</div>
									</td>
									<td>
										<div align="left"><asp:Label ID="TRADER_REG_NO_LABEL3" runat="server"></asp:Label></div>
									</td>
									<td> 
										<div align="right"><asp:TextBox ID="TRN_SEAL_QTY3" Columns="5" MaxLength="5"   runat="server"></asp:TextBox>枚</div>
									</td>
									<td> 
										<div align="center">～</div>
									</td>
								</tr>
					
								<tr bgcolor="#FFFFFF"> 
									<td> 
										<div align="center">
										<asp:TextBox ID="TRADER_REG_NO14" MaxLength="2" Columns="2" runat="server"></asp:TextBox>
										- 
										<asp:TextBox ID="TRADER_REG_NO24" MaxLength="5" Columns="5" runat="server"></asp:TextBox>
										</div>
									</td>
									<td>
										<div align="left"><asp:Label ID="TRADER_REG_NO_LABEL4" runat="server"></asp:Label></div>
									</td>
									<td> 
										<div align="right"><asp:TextBox ID="TRN_SEAL_QTY4" Columns="5" MaxLength="5"   runat="server"></asp:TextBox>枚</div>
									</td>
									<td> 
										<div align="center">～</div>
									</td>
								</tr>
					
								<tr bgcolor="#FFFFFF"> 
									<td> 
										<div align="center">
										<asp:TextBox ID="TRADER_REG_NO15" MaxLength="2" Columns="2" runat="server"></asp:TextBox>
										- 
										<asp:TextBox ID="TRADER_REG_NO25" MaxLength="5" Columns="5" runat="server"></asp:TextBox>
										</div>
									</td>
									<td>
										<div align="left"><asp:Label ID="TRADER_REG_NO_LABEL5" runat="server"></asp:Label></div>
									</td>
									<td> 
										<div align="right"><asp:TextBox ID="TRN_SEAL_QTY5" Columns="5" MaxLength="5"   runat="server"></asp:TextBox>枚</div>
									</td>
									<td> 
										<div align="center">～</div>
									</td>
								</tr>
						
						
						
						
								<tr bgcolor="#FFFFFF"> 
									<td colspan="2" bgcolor="#f0f0f0"> 
										<div align="right">合計枚数</div>
									</td>
									<td> 
										<div align="right"> <asp:TextBox ID="sum" Columns="5" MaxLength="5"  Enabled=false  runat="server"></asp:TextBox>枚 </div>
									</td>
									<td> 
										<div align="center">～</div>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
			</table>
			<!--
				<br>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr> 
					<td width="423"> 
						<table width="423" border="0" cellspacing="0" cellpadding="0" bgcolor="#999999">
							<tr>
								<td width="0" height="0"> 
									<table width="100%" border="0" cellspacing="1" cellpadding="2">
										<tr>
											<td bgcolor="#f0f0f0" width="325"> 
												<div align="center">確認シール貼付報告書(FAX/OCR用紙)注文</div>
											</td>
											<td bgcolor="#FFFFFF" align="right"> 
											    <asp:TextBox ID="OCR_ORDER_QTY" Columns="5" MaxLength="5" runat="server"></asp:TextBox>枚
												
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
					<td width="5">　</td>
					<td><font color="#333333">事務局から発送</font></td>
				</tr>
			</table>
      -->
				<br>
				<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#999999">
					<tr> 
						<td width="0" height="0"> 
							
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
                <tr bgcolor="#f0f0f0"> 
									<td width="50%" nowrap>発注（回胴遊商→印刷会社）</td>
									<td width="50%" nowrap>発送（印刷会社→組合員）</td>
								</tr>
								<tr bgcolor="#f0f0f0"> 
									<td width="50%" valign="top" nowrap>発注日<br>
										担当者</td>
									<td width="50%" valign="top" nowrap>発送日<br>
										担当者<br>
										配送会社<br>
										伝票番号</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<br>
				<br>
				<table width="600" border="0" cellpadding=0 cellspacing=0>
				<tr> 
					<td width="590"> 
						<asp:Button ID="Button1" Text="更新" runat="server" OnClick="update" />
						<asp:Button ID="Button2" Text="削除" runat="server" OnClick="deleteConfirm" />
							&nbsp; 
						<asp:Button ID="Button3" Text="戻る" runat="server" OnClick="goBack" />
					</td>
					<td width="10"> 
					    <% 
                            if (login.isJimukyoku())
                        { %>
                        <asp:Button ID="Button4" Text="受付" runat="server" OnClick="receipt" OnClientClick="return receipt()" />
                        
                        <%} %>
					</td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
	<br>
	<br>
</FORM>
	</body>
</html>